import type { FieldRule } from 'vant'

export const mobileRule: Array<FieldRule> = [
  { required: true, message: '请输入手机号' },
  { pattern: /^1[3-9]\d{9}$/, message: '手机号格式不正确' }
]

export const passwordRule: Array<FieldRule> = [
  { required: true, message: '请输入密码' },
  { pattern: /^(?=.*[A-Za-z])(?=.*\d)[A-Za-z\d]{8,24}$/, message: '密码需8-24个字符码' }
]

export const verificationCodeRule: Array<FieldRule> = [
  { required: true, message: '请输入验证码' },
  { pattern: /^\d{6}$/, message: '验证码是6个数字' }
]
